package client

import (
	"github.com/akirakazu/go-simplejson"
)

func (c *Client) login() {
	msg := json.New()
	if !c.identity.Has("session_id") {
		uid, _ := uuid.NewV4()
		id := uid.String()
		identity.Set("session_id", id)
	}
	msg.Set("identity", identity)
	msg.Set("pwd", c.pwd)
	pack := NewPack("login", msg)
	c.sendPack(pack, false)
}
